﻿using KXmlUIControl.KControl;
using System;
using System.Windows.Forms;

namespace KXmlUIControl
{
    public class XmlCountdownObject : XmlControlBase
    {      
        /// <summary>
        /// 倒计时时长(秒)
        /// </summary>
        public int CountDownSecond { get; set; }      
    
        public XmlCountdownObject()
            : base()
        {

        }

        public override string ToXMLString()
        {
            throw new NotImplementedException();
        }

      

        public void SetCountdownSecond(CountdownControl countControl)
        {           
            countControl.CountDownSecond = CountDownSecond;
        }

        public override void SetValues(Control ctl)
        {
            base.SetValues(ctl);
            SetCountdownSecond(ctl as CountdownControl);
        }

        public override Control ToControl(object parent)
        {
            CountdownControl countControl = new CountdownControl();
            SetValues(countControl);
            return countControl;
        }
    }
}
